import 'package:flutter/material.dart';
import 'package:wheel_of_fortune/utils/utils.dart';

class SpinButton extends StatelessWidget {
  final type;
  final onTap;
  const SpinButton({this.type = 0,this.onTap , Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      child: InkWell(
        onTap: this.onTap,
        child: this.type==1?
          Container(
            width: 236,
            height: 40,
            decoration: BoxDecoration(
              color: this.onTap!=null?Color(0xFFFFCC00):greyDBColor,
              borderRadius: BorderRadius.circular(20),
            ),
            child: Center(
              child: Text('Spin', style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 17,fontFamily: 'Avenir Next LT Pro',fontWeight: FontWeight.bold),),
            ),
          ):
          Container(
            width: 236,
            height: 40,
            decoration: BoxDecoration(
              color: Color(0xFF6E6E6E),
              borderRadius: BorderRadius.circular(20),
            ),
            child: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[//#FFB32C
                  Text('5 hours 48 minutes', style: TextStyle(color: Color(0xFFFFB32C), fontSize: 12,fontFamily: 'Avenir Next LT Pro',fontWeight: FontWeight.bold)),
                  Text('Remaining until the next spin', style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 11,fontFamily: 'Avenir Next LT Pro',),),
                ],
              ),
            ),
          ),
      ),
    );
  }
}